//
//  CDHomeModel.swift
//  CDLiftWithDisplay
//
//  Created by SteveLi on 2017/9/17.
//  Copyright © 2017年 李军桦. All rights reserved.
//

import UIKit

class CDHomeModel: NSObject {
    var intro: String?
    var image: String?
    
    init(dict:[String:Any]){
        super.init()
        setValuesForKeys(dict)
    }
    class func homeInfos() -> [CDHomeModel]{
        guard
            let filePath = Bundle.main.path(forAuxiliaryExecutable: "Home.plist"),
        let dictArray = NSArray(contentsOfFile: filePath) else {
            return []
        }
        var modelArray = [CDHomeModel]()
        for dict in dictArray {
            let model = CDHomeModel(dict: dict as! [String : Any])
            modelArray.append(model)
        }
        return modelArray
    
    }
    
}
    
    
    

